package com.study.ssm.annotation.injection;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @author zhoujunlin
 * @date 2023年07月26日 10:23
 * @desc
 */
@Data
/*
 * <context:property-placeholder location="classpath:annotation/init.properties"/>
 * */
@Component
@PropertySource("classpath:annotation/init.properties")
public class Category {

    @Value("${id}")
    private int id;
    @Value("${name}")
    private String name;

}
